﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dbPoll_Application.ViewModels.MCQResponseViewModel>" %>
<%@ Import Namespace="dbPoll_Application.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SendMCQResponse
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="pageHeadingContainer"><h2 class="pageHeading">MCQResponse</h2></div>
    <div id="contentContainer">
    <p>Question: <%= Model.question.question %></p>

    <!-- using (Html.BeginForm("Index", "Report", FormMethod.Post)) -->
    <% using (Html.BeginForm("SaveMCQResponse", "Respond", FormMethod.Post)) 
       { %>
       <%= Html.HiddenFor(model => model.question.questionID)%>
    <table class="questions">  
	    <tr>
	    <td align="right"><label for="MCQResponse">Select an option:</label></td>
	    <td><%= Html.ListBox("responses", Model.optionList)%></td>
	    </tr> 
	    <tr>
	    <td align="right"><label for="MCQResponse">Feedback:</label></td>
	    <td><%= Html.TextAreaFor(model => model.feedback)%></td>
	    <td><span><%= Html.ValidationMessageFor(model => model.feedback)%></span></td>
	    </tr> 	      
        <tr>
	    <td></td>
	    <td><input type="submit" name="Respond" value="Respond" /></td>
	    <td></td>
	    </tr>
    </table>
     <%= Html.ValidationSummary(true)%>
     <% } %>         
    </div>
</asp:Content>
